Removed some remaining /v3’s from the docs#2478
Conversation
|
WalkthroughThe changes update documentation and examples across multiple files. Most code samples switch SDK imports from @trigger.dev/*/v3 (and npm:.../v3) to the root packages (@trigger.dev/sdk, @trigger.dev/core). Minor formatting adjustments are applied in several examples, with small stylistic edits and added bullets in one guide. One external link is updated for the AWS SDK. In docs/v3-openapi.yaml, example imports are similarly updated and the API path /api/v3/runs/{runId} is changed to /api/runs/{runId}. No exported or public API declarations are modified in the documentation. Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (7)
docs/guides/frameworks/supabase-edge-functions-basic.mdx (1)
188-189: Fix typo and use HTTPS.
- “succesful” → “successful”
- Switch
http://cloud.trigger.devtohttps://cloud.trigger.devApply this diff:
-Check your [cloud.trigger.dev](http://cloud.trigger.dev) dashboard and you should see a succesful `hello-world` task. +Check your [cloud.trigger.dev](https://cloud.trigger.dev) dashboard and you should see a successful `hello-world` task.docs/v3-openapi.yaml (4)
46-53: Fix TS object syntax: missing comma after cronAdd a comma after the cron line in the schedules.create example to avoid a syntax error when copied.
- cron: '0 0 * * *' + cron: '0 0 * * *',
621-626: Unify tag to “runs” for consistencyOther endpoints use the tag “runs”. Change this one from singular “run” to plural “runs”.
- tags: - - run + tags: + - runs
1232-1240: Don’t await task() definitions
task()returns a definition, not a Promise. Removeawaitin both examples.-export const myTask = await task({ +export const myTask = task({Also applies to: 1343-1351
941-959: Fix typos and grammar in user-facing text
- “mulitple” → “multiple”
- “an run” → “a run”
- “plain english” → “plain English” (two occurrences)
- summary: Upload mulitple environment variables + summary: Upload multiple environment variables ... - The ID of an run, starts with `run_`. + The ID of a run, starts with `run_`. ... - description: The description of the generator in plain english + description: The description of the generator in plain English ... - description: The description of the generator in plain english + description: The description of the generator in plain EnglishAlso applies to: 1462-1464, 2110-2113, 2226-2228
docs/realtime/backend/streams.mdx (1)
23-60: Import logger or use console in the basic example
logger.logis used butloggerisn’t imported. Either import it or switch toconsole.log.-import { task, metadata } from "@trigger.dev/sdk"; +import { task, metadata, logger } from "@trigger.dev/sdk";docs/how-to-reduce-your-spend.mdx (1)
65-81: Add missing import for waitThe example uses
wait.for(...)without importingwait.+import { wait } from "@trigger.dev/sdk"; export const expensiveApiCall = task({
🧹 Nitpick comments (9)
docs/guides/frameworks/supabase-edge-functions-basic.mdx (1)
80-80: Deno import path updated correctly; consider versioning consistency.
Importing fromnpm:@trigger.dev/sdk@3.0.0(no/v3) looks right. For consistency across docs (and to avoid accidental drift vs. other pages using@latest), pick one approach repo-wide: either pin to a specific version everywhere or use@latesteverywhere, and add a brief note explaining why.docs/guides/frameworks/supabase-edge-functions-database-webhooks.mdx (2)
333-333: Prefer pinning Deno npm specifier (or document the choice).
Usingnpm:@trigger.dev/sdk@latestrisks unexpected breakage in Edge Functions. Consider pinning to the same version used elsewhere in these docs, or add a note about trade-offs if you keep@latest.Apply this diff to pin (example version shown to match other page; update as needed):
-import { tasks } from "npm:@trigger.dev/sdk@latest"; +import { tasks } from "npm:@trigger.dev/sdk@3.0.0";
425-425: Use HTTPS for dashboard link.
Switch tohttps://cloud.trigger.dev.-Check your [cloud.trigger.dev](http://cloud.trigger.dev) project 'Runs' list +Check your [cloud.trigger.dev](https://cloud.trigger.dev) project 'Runs' listdocs/guides/python/python-image-processing.mdx (1)
23-23: Confirm AWS SDK S3 docs link targets v3.Text says “AWS SDK v3” but the new URL drops
/v3/. Please verify it resolves to the v3 S3 client docs (Client S3) and update the link text or URL if needed.docs/v3-openapi.yaml (2)
434-441: Verify metadata.save vs metadata.setElsewhere in the docs you use
metadata.set(). Please confirmmetadata.save()is a valid API; if not, switch tometadata.set("key", value)or equivalent and ensure consistency across docs.
1001-1006: Align upload variables shape with schema or add a noteOpenAPI schema specifies
variablesas an array of{ name, value }, but the TS sample passes a map. Either:
- Update the sample to an array:
- variables: { SLACK_API_KEY: "slack_key_1234" }, + variables: [{ name: "SLACK_API_KEY", value: "slack_key_1234" }],
- Or add a brief note that the SDK accepts a map and converts it to the API shape.
Also applies to: 949-959
docs/realtime/backend/subscribe.mdx (1)
14-19: LGTM on root SDK import changeThe switch to
@trigger.dev/sdklooks good and matches the PR goal. Also consider updating any internal guidelines/rules that still recommend/v3to avoid future churn.docs/realtime/backend/streams.mdx (2)
101-105: Clarify stream type commentThe comment says “array of strings” but
STREAMS.fetchis typed asstring. Suggest: “string chunks”.- fetch: string; // The response body will be an array of strings + fetch: string; // The stream yields string chunks
173-176: Remove unused import ‘runs’ in AI SDK examples
runsisn’t used in these blocks. Dropping it keeps samples tighter.-import { logger, metadata, runs, schemaTask } from "@trigger.dev/sdk"; +import { logger, metadata, schemaTask } from "@trigger.dev/sdk";Also applies to: 219-219, 287-287
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (15)
docs/guides/frameworks/supabase-edge-functions-basic.mdx(1 hunks)docs/guides/frameworks/supabase-edge-functions-database-webhooks.mdx(1 hunks)docs/guides/python/python-crawl4ai.mdx(1 hunks)docs/guides/python/python-image-processing.mdx(1 hunks)docs/how-to-reduce-your-spend.mdx(7 hunks)docs/realtime/auth.mdx(12 hunks)docs/realtime/backend/overview.mdx(1 hunks)docs/realtime/backend/streams.mdx(7 hunks)docs/realtime/backend/subscribe.mdx(8 hunks)docs/realtime/how-it-works.mdx(3 hunks)docs/realtime/run-object.mdx(2 hunks)docs/runs/metadata.mdx(3 hunks)docs/snippets/node-versions.mdx(1 hunks)docs/troubleshooting.mdx(1 hunks)docs/v3-openapi.yaml(29 hunks)
🧰 Additional context used
🧠 Learnings (22)
📓 Common learnings
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Import Trigger.dev APIs from "trigger.dev/sdk/v3" when writing tasks or related utilities
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Import Trigger.dev APIs from "trigger.dev/sdk/v3" when writing tasks or related utilities
Applied to files:
docs/realtime/backend/overview.mdxdocs/runs/metadata.mdxdocs/v3-openapi.yamldocs/guides/frameworks/supabase-edge-functions-basic.mdxdocs/guides/python/python-crawl4ai.mdxdocs/guides/frameworks/supabase-edge-functions-database-webhooks.mdxdocs/realtime/how-it-works.mdxdocs/troubleshooting.mdxdocs/realtime/auth.mdxdocs/realtime/backend/streams.mdxdocs/snippets/node-versions.mdxdocs/realtime/run-object.mdxdocs/realtime/backend/subscribe.mdx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Do not use client.defineJob or any deprecated v2 patterns (e.g., eventTrigger) when defining tasks
Applied to files:
docs/realtime/backend/overview.mdxdocs/v3-openapi.yamldocs/guides/frameworks/supabase-edge-functions-basic.mdxdocs/guides/frameworks/supabase-edge-functions-database-webhooks.mdxdocs/realtime/backend/subscribe.mdx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Define tasks using task({ id, run, ... }) with a unique id per project
Applied to files:
docs/realtime/backend/overview.mdxdocs/runs/metadata.mdxdocs/v3-openapi.yamldocs/guides/frameworks/supabase-edge-functions-basic.mdxdocs/guides/frameworks/supabase-edge-functions-database-webhooks.mdxdocs/realtime/how-it-works.mdxdocs/realtime/auth.mdxdocs/realtime/backend/streams.mdxdocs/realtime/run-object.mdxdocs/realtime/backend/subscribe.mdxdocs/how-to-reduce-your-spend.mdx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Export every task (including subtasks) defined with task(), schedules.task(), or schemaTask()
Applied to files:
docs/realtime/backend/overview.mdxdocs/v3-openapi.yamldocs/guides/frameworks/supabase-edge-functions-basic.mdxdocs/guides/frameworks/supabase-edge-functions-database-webhooks.mdxdocs/realtime/auth.mdxdocs/realtime/backend/streams.mdxdocs/realtime/run-object.mdxdocs/realtime/backend/subscribe.mdx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use schedules.task(...) for scheduled (cron) tasks; do not implement schedules as plain task() with external cron logic
Applied to files:
docs/realtime/backend/overview.mdxdocs/v3-openapi.yamldocs/guides/frameworks/supabase-edge-functions-basic.mdxdocs/guides/frameworks/supabase-edge-functions-database-webhooks.mdxdocs/realtime/backend/streams.mdxdocs/realtime/backend/subscribe.mdx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use triggerAndWait() only from within a task context (not from generic app code) and handle result.ok or use unwrap() with error handling
Applied to files:
docs/realtime/backend/overview.mdxdocs/v3-openapi.yamldocs/guides/frameworks/supabase-edge-functions-basic.mdxdocs/guides/frameworks/supabase-edge-functions-database-webhooks.mdxdocs/realtime/auth.mdxdocs/realtime/backend/subscribe.mdxdocs/how-to-reduce-your-spend.mdx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use schemaTask({ schema, run, ... }) to validate payloads when input validation is required
Applied to files:
docs/realtime/backend/overview.mdxdocs/v3-openapi.yamldocs/guides/frameworks/supabase-edge-functions-basic.mdxdocs/realtime/backend/streams.mdxdocs/realtime/run-object.mdxdocs/realtime/backend/subscribe.mdx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task multiple times in a loop from inside another task, use batchTrigger()/batchTriggerAndWait() instead of per-item trigger() calls
Applied to files:
docs/realtime/backend/overview.mdxdocs/runs/metadata.mdxdocs/v3-openapi.yamldocs/realtime/how-it-works.mdxdocs/realtime/auth.mdxdocs/realtime/backend/streams.mdx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: When triggering tasks from backend code, prefer tasks.trigger/tasks.batchTrigger/batch.trigger with type-only imports for type safety
Applied to files:
docs/realtime/backend/overview.mdxdocs/v3-openapi.yamldocs/guides/frameworks/supabase-edge-functions-basic.mdxdocs/realtime/auth.mdxdocs/realtime/run-object.mdxdocs/realtime/backend/subscribe.mdx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use metadata API (metadata.current/get/set/append/stream, etc.) only inside run functions or lifecycle hooks
Applied to files:
docs/v3-openapi.yamldocs/realtime/backend/subscribe.mdx
📚 Learning: 2025-07-12T18:06:04.133Z
Learnt from: matt-aitken
PR: triggerdotdev/trigger.dev#2264
File: apps/webapp/app/services/runsRepository.server.ts:172-174
Timestamp: 2025-07-12T18:06:04.133Z
Learning: In apps/webapp/app/services/runsRepository.server.ts, the in-memory status filtering after fetching runs from Prisma is intentionally used as a workaround for ClickHouse data delays. This approach is acceptable because the result set is limited to a maximum of 100 runs due to pagination, making the performance impact negligible.
Applied to files:
docs/v3-openapi.yaml
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to trigger.config.ts : Provide a valid Trigger.dev configuration using defineConfig with project ref and dirs (e.g., ["./trigger"]; tests/specs auto-excluded)
Applied to files:
docs/v3-openapi.yamldocs/guides/python/python-crawl4ai.mdxdocs/troubleshooting.mdx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to trigger.config.ts : Configure global task lifecycle hooks (onStart/onSuccess/onFailure) only within trigger.config.ts if needed, not within arbitrary files
Applied to files:
docs/v3-openapi.yamldocs/guides/frameworks/supabase-edge-functions-basic.mdxdocs/guides/python/python-crawl4ai.mdxdocs/guides/frameworks/supabase-edge-functions-database-webhooks.mdx
📚 Learning: 2025-08-29T10:06:49.293Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-08-29T10:06:49.293Z
Learning: Applies to {apps/webapp/app/**/*.server.{ts,tsx},apps/webapp/app/routes/**/*.ts} : Access environment variables only via the env export from app/env.server.ts; do not reference process.env directly
Applied to files:
docs/v3-openapi.yaml
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Inside tasks, prefer logger.debug/log/info/warn/error over ad-hoc console logging for structured logs
Applied to files:
docs/v3-openapi.yaml
📚 Learning: 2025-08-29T10:06:49.293Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-08-29T10:06:49.293Z
Learning: Applies to apps/webapp/**/*.{ts,tsx} : When importing from trigger.dev/core in the webapp, never import the root package path; always use one of the documented subpath exports from trigger.dev/core’s package.json
Applied to files:
docs/v3-openapi.yamldocs/guides/frameworks/supabase-edge-functions-basic.mdxdocs/troubleshooting.mdxdocs/realtime/run-object.mdx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : For idempotent child-task invocations, create and pass idempotencyKey (and optional TTL) when calling trigger()/batchTrigger() from tasks
Applied to files:
docs/v3-openapi.yamldocs/realtime/auth.mdx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to trigger.config.ts : Declare build options and extensions (external, jsx, conditions, extensions) via the build block in trigger.config.ts rather than custom scripts
Applied to files:
docs/guides/python/python-crawl4ai.mdxdocs/snippets/node-versions.mdx
📚 Learning: 2025-02-10T10:56:31.402Z
Learnt from: zvictor
PR: triggerdotdev/trigger.dev#1686
File: packages/build/src/extensions/python.ts:110-116
Timestamp: 2025-02-10T10:56:31.402Z
Learning: In Docker build contexts for Trigger.dev extensions, avoid over-engineering security measures when handling user-provided configuration (like Python requirements) as the build context is already isolated and the content is user-controlled.
Applied to files:
docs/guides/python/python-crawl4ai.mdx
📚 Learning: 2025-02-10T11:19:37.014Z
Learnt from: zvictor
PR: triggerdotdev/trigger.dev#1686
File: packages/build/src/extensions/python.ts:0-0
Timestamp: 2025-02-10T11:19:37.014Z
Learning: In the Python extension for Trigger.dev, do not enforce `.py` file extensions for Python scripts to maintain flexibility for developers.
Applied to files:
docs/guides/python/python-crawl4ai.mdx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: For Realtime subscriptions or React hooks, provide a Public Access Token and scope it appropriately (e.g., via TriggerAuthContext)
Applied to files:
docs/realtime/auth.mdx
🪛 LanguageTool
docs/guides/python/python-image-processing.mdx
[grammar] ~23-~23: There might be a mistake here.
Context: ...iptSDK/latest/client/s3/) for S3 uploads - S3-compatible storage support (AWS S3, C...
(QB_NEW_EN)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (23)
docs/realtime/backend/overview.mdx (1)
33-33: LGTM; confirm root exports.
{ runs, tasks }from@trigger.dev/sdkreads well and aligns with the PR goal. Please double-check that both are exported from the root entry in the currently published version you’re targeting.docs/guides/python/python-crawl4ai.mdx (1)
65-65: Root@trigger.dev/core/buildimport looks correct; verify types exist in this path for your target version.
Just ensureBuildContextandBuildExtensionare still exported from@trigger.dev/core/buildin the release readers will use.docs/snippets/node-versions.mdx (1)
16-16: LGTM.
ImportingdefineConfigfrom@trigger.dev/sdk(no/v3) matches the cleanup goal.docs/realtime/auth.mdx (12)
26-29: LGTM: migrated import to root SDK path.Importing from "@trigger.dev/sdk" aligns with the PR’s goal to remove /v3 references.
36-45: LGTM: consistent root import in scopes example.
50-59: LGTM: runs-scoped token example uses root import.
64-73: LGTM: tasks scope example uses root import.
78-87: LGTM: tags scope example uses root import.
92-101: LGTM: batch scope example uses root import.
106-116: LGTM: combined scopes example uses root import.
123-128: LGTM: expiration example uses root import.
159-163: LGTM: trigger token creation import path updated.
170-174: LGTM: multi-task trigger token import path updated.
181-187: LGTM: multipleUse trigger token import path updated.
194-200: LGTM: expiration on trigger tokens import path updated.docs/realtime/run-object.mdx (2)
129-146: LGTM: subscribeToRun example now uses root SDK import.
151-168: LGTM: subscribeToRunsWithTag example now uses root SDK import.docs/runs/metadata.mdx (3)
526-546: LGTM: batchProcessingTask import path updated.
553-580: LGTM: deploymentTask import path updated.
587-613: LGTM: userTask import path updated.docs/troubleshooting.mdx (1)
42-44: LGTM: Yarn PnP error text updated to @trigger.dev/core (no /v3).Matches the de-versioning objective.
docs/realtime/how-it-works.mdx (1)
28-39: LGTMExamples correctly use root SDK imports and look consistent with the subscribe API.
Also applies to: 46-53, 58-65
docs/how-to-reduce-your-spend.mdx (1)
10-14: LGTM on copy and style updatesBullets and example formatting improvements read well and match house style.
Also applies to: 22-25, 48-53, 113-116, 141-154
No description provided.